package com.joking.listener;


import com.joking.config.Constants;
import com.joking.entity.Simple;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SimpleListener {

    @RabbitHandler
    @RabbitListener(queuesToDeclare = @Queue(Constants.SIMPLE_QUEUE))
    public void listener(Simple simple) {
        log.info("接收到 simple： {}", simple);
    }

}
